package com.yanzhu.service.impl;

import com.yanzhu.service.WithdrawDepositService;
import com.yanzhu.service.mapper.WithdrawDepositMapper;
import com.yanzhu.service.model.WithdrawDeposit;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 方炎柱
 * @Description:
 * @Date: Created in 21:45 2018/1/21
 * @Modified:
 */
@AllArgsConstructor
@Service
public class WithdrawDepositServiceImpl implements WithdrawDepositService {
    private WithdrawDepositMapper withdrawDepositMapper;

    @Override
    public int insert(WithdrawDeposit withdrawDeposit) {
        return withdrawDepositMapper.insert(withdrawDeposit);
    }

    @Override
    public List<WithdrawDeposit> queryWithdrawDepositList(long uid, int page, int size) {
        int begin = (page - 1) * size;
        return withdrawDepositMapper.queryWithdrawDepositList(uid, begin, size);
    }

    @Override
    public int deleteWithdrawDepositById(long id) {
        return withdrawDepositMapper.deleteWithdrawDepositById(id);
    }

    @Override
    public int deleteWithdrawDepositAll(long uid) {
        return withdrawDepositMapper.deleteWithdrawDepositAll(uid);
    }
}
